<template>
  <div class="input" :style="{'height':data.height*40 + (data.height-1)*8 + 'px'}">
    <div class="name" :style="{'line-height':data.height*40 + (data.height-1)*8 + 'px'}">输入框 :</div>
    <el-input :style="{'margin-top':(data.height*40 + (data.height-1)*8 -30)/2 + 'px'}" v-model="data.value" placeholder="请输入内容"></el-input>
  </div>
</template>
<script>
export default {
  props: {
    data: {
      type: Object
    }
  },
  data() {
    return {

    }
  },
  computed: {},
  methods: {},
  mounted() {
    console.log(this.data)
  }
}

</script>
<style lang="less">
.input {
  width: 100%;
  height: 100%;
  display: flex;
  border: 1px dashed #000;
  box-sizing: border-box;
  border-radius: 6px;
  height: 40px;
  line-height: 38px;
  .name {
    padding: 0 10px;
  }
  .el-input {
    flex: 1;
    padding-right: 10px;
    height: 30px;
    line-height: 30px;
    margin-top: 4px;
    input {
      height: 30px;
    }
  }
}

</style>
